package stuttgart.uni.bluetoothcontactexchange;

import java.io.Serializable;

// Objekt zum Kontakt Austausch (Beschraenkt auf Emails,Telefonnummerm und Name)
public class PersonData implements Serializable{
	
	private String name;
	private String[] numbers;
	private int[] numberTypes;
	private String[] emails;
	
	

	public PersonData(String name, String[] numbers, int[] numberTypes, String[] emails) {
		
		this.name = name;
		this.numbers = numbers;
		this.numberTypes = numberTypes;
		this.emails = emails;
	}

	public String getName (){
		return name;
	}

	public String[] getNumbers (){
		return numbers;
	}
	
	public int[] getNumberTypes() {
		return numberTypes;
	}
	
	public String[] getEmails (){
		return emails;
	}
	
	public String printData(){
		
		String msg;
		
		msg = "Name: "+ name;
		
		if(numbers!=null){
			for(int i = 0;i<numbers.length;i++){
				msg = msg +", Telefonnummer: " + numbers[i]+" vom Typ: "+numberTypes[i];
			}
		}
		
		if(emails!=null){
			for(int i = 0;i<emails.length;i++){
				msg = msg +", email: " + emails[i];
			}
		}
		
		
		return msg;
	}
}
